package com.ysd.lis.controller.lab;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.request.lab.FinanceSettleDto;
import com.ysd.lis.request.lab.SalesSettleDto;
import com.ysd.lis.service.lab.LabFinanceSalesSettleService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import com.ysd.lis.entity.lab.LabFinanceSalesSettle;
import com.ysd.lis.service.lab.LabFinanceSalesSettleService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 销售财务结算 前端控制器
 * </p>
 *
 * @author WH
 * @since 2024-11-06
 */
@RestController
@RequestMapping("/lab/financeSalesSettle")
public class LabFinanceSalesSettleController extends BaseController {

    @Autowired
    LabFinanceSalesSettleService labFinanceSalesSettleService;
    @ApiOperation("查询")
    @GetMapping("/findFinanceSalesSettleList")
    public Result findFinanceSalesSettleList(SalesSettleDto param) {
        return labFinanceSalesSettleService.findFinanceSalesSettleList(param);
    }

    @ApiOperation("查询")
    @GetMapping("/findFinanceSettlesBySales")
    public Result findFinanceSettlesBySales(SalesSettleDto param) {
        return labFinanceSalesSettleService.findFinanceSettlesBySales(param);
    }

    @ApiOperation("销售结算")
    @PostMapping("/saveFinanceSalesSettle")
    public Result saveFinanceSalesSettle(@RequestBody LabFinanceSalesSettle labFinanceSalesSettle) {
        return labFinanceSalesSettleService.saveFinanceSalesSettle(labFinanceSalesSettle);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteSalesSettleList")
    public Result batchDeleteSalesSettleList(@RequestBody SalesSettleDto dto){
        return  labFinanceSalesSettleService.batchDeleteSalesSettleList(dto);
    }


}
